I'm trying to connect a database by using python pyodbc
library. And I have the following error:
pyodbc.Error: ('HY000', '[HY000] [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: The logon attempt failed\r\n (-2146893044) (SQLDriverConnect); [HY000
] [Microsoft][SQL Server Native Client 11.0]Cannot generate SSPI context (-2146893044); [HY000] [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: The lo gon attempt failed\r\n (-2146893044); [HY000] [Microsoft][SQL Server Native Client 11.0]Cannot generate SSPI context (-2146893044)')
I'm using regular login/password authentcation and it works on the same machine when connecting by MS SQL Management Studio. And it also works fine when I run the same Python script with same credentials on different machine